Fix tests sample_privatector sample_privatedtor failing with Python 3.11.5
Remove special characters from the format string as they cause:
ValueError PyUnicode_FromFormatV() expects an ASCII-encoded format string, got a non-ASCII byte: 0xc2
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
PyEnum: make forgiving duplicates work with Python 3.11
There was a silent change in PyEnums that turns Enum attributes
into properties. This does not harm the Python interface but
needed some change in the duplication emulation.
Furthermore, new internal enums are created with an underscore name.
The meta class was changed from EnumMeta to EnumType.
[ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
Shiboken: Fix the oldest shiboken bug ever which shows up on Python 3.11
b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55
There was a `PySequence_Check` in the evaluation of some signature
function parameter processing, which should have been `PyTuple_Check`.
Since the new PyEnums are also sequences, the new optimization in
Python 3.11 changed the parameter handling in a correct way and
replaced the argument tuple by a direct single argument of an enum
type. And that is also a sequence ...
There are probably still dormant issues like this in the codebase
which gives reason to submit a task that checks all Python interface
functions for correctness.
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Dmitry Shachnev [Sun, 15 Oct 2023 20:04:58 +0000 (21:04 +0100)]
pyside2 (5.15.11-1) unstable; urgency=medium
* Team upload.
* New upstream release.
* Drop patches, included in the new release:
- libshiboken-Fix-a-crash-in-Shiboken-Object-isValid.patch
- Fix-usage-of-Py_TYPE-for-Python-3.11.patch
- libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
- Fix-Property-GC-tracking-for-Python-3.11.patch
- Fix-GLES-builds.patch
* Refresh other patches.
Fix tests sample_privatector sample_privatedtor failing with Python 3.11.5
Remove special characters from the format string as they cause:
ValueError PyUnicode_FromFormatV() expects an ASCII-encoded format string, got a non-ASCII byte: 0xc2
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
PyEnum: make forgiving duplicates work with Python 3.11
There was a silent change in PyEnums that turns Enum attributes
into properties. This does not harm the Python interface but
needed some change in the duplication emulation.
Furthermore, new internal enums are created with an underscore name.
The meta class was changed from EnumMeta to EnumType.
[ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
Shiboken: Fix the oldest shiboken bug ever which shows up on Python 3.11
b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55
There was a `PySequence_Check` in the evaluation of some signature
function parameter processing, which should have been `PyTuple_Check`.
Since the new PyEnums are also sequences, the new optimization in
Python 3.11 changed the parameter handling in a correct way and
replaced the argument tuple by a direct single argument of an enum
type. And that is also a sequence ...
There are probably still dormant issues like this in the codebase
which gives reason to submit a task that checks all Python interface
functions for correctness.
libshiboken: Fix crashes with static strings in Python 3.11
In Python 3.11, some strings come with a refcount above decimal 1000000000, apparently indicating that they are interned. Replace the
mechanism by PyUnicode_InternFromString().
Task-number: PYSIDE-1960 Pick-to: 6.3 6.2 5.15
Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit a09a1db8391243e6bb290ee66bb6e3afbb114c61)
Gbp-Pq: Name libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Dmitry Shachnev [Sun, 1 Oct 2023 20:43:44 +0000 (21:43 +0100)]
pyside2 (5.15.10-4) unstable; urgency=medium
* Team upload.
* Build with LLVM 15 for now (closes: #1051886).
* Backport upstream patch to fix test failures with Python 3.11.5.
* Add a debian/clean file (closes: #1047480).
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
PyEnum: make forgiving duplicates work with Python 3.11
There was a silent change in PyEnums that turns Enum attributes
into properties. This does not harm the Python interface but
needed some change in the duplication emulation.
Furthermore, new internal enums are created with an underscore name.
The meta class was changed from EnumMeta to EnumType.
[ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
Shiboken: Fix the oldest shiboken bug ever which shows up on Python 3.11
b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55
There was a `PySequence_Check` in the evaluation of some signature
function parameter processing, which should have been `PyTuple_Check`.
Since the new PyEnums are also sequences, the new optimization in
Python 3.11 changed the parameter handling in a correct way and
replaced the argument tuple by a direct single argument of an enum
type. And that is also a sequence ...
There are probably still dormant issues like this in the codebase
which gives reason to submit a task that checks all Python interface
functions for correctness.
libshiboken: Fix crashes with static strings in Python 3.11
In Python 3.11, some strings come with a refcount above decimal 1000000000, apparently indicating that they are interned. Replace the
mechanism by PyUnicode_InternFromString().
Task-number: PYSIDE-1960 Pick-to: 6.3 6.2 5.15
Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit a09a1db8391243e6bb290ee66bb6e3afbb114c61)
Gbp-Pq: Name libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
PyEnum: make forgiving duplicates work with Python 3.11
There was a silent change in PyEnums that turns Enum attributes
into properties. This does not harm the Python interface but
needed some change in the duplication emulation.
Furthermore, new internal enums are created with an underscore name.
The meta class was changed from EnumMeta to EnumType.
[ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
Shiboken: Fix the oldest shiboken bug ever which shows up on Python 3.11
b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55
There was a `PySequence_Check` in the evaluation of some signature
function parameter processing, which should have been `PyTuple_Check`.
Since the new PyEnums are also sequences, the new optimization in
Python 3.11 changed the parameter handling in a correct way and
replaced the argument tuple by a direct single argument of an enum
type. And that is also a sequence ...
There are probably still dormant issues like this in the codebase
which gives reason to submit a task that checks all Python interface
functions for correctness.
libshiboken: Fix crashes with static strings in Python 3.11
In Python 3.11, some strings come with a refcount above decimal 1000000000, apparently indicating that they are interned. Replace the
mechanism by PyUnicode_InternFromString().
Task-number: PYSIDE-1960 Pick-to: 6.3 6.2 5.15
Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit a09a1db8391243e6bb290ee66bb6e3afbb114c61)
Gbp-Pq: Name libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
PyEnum: make forgiving duplicates work with Python 3.11
There was a silent change in PyEnums that turns Enum attributes
into properties. This does not harm the Python interface but
needed some change in the duplication emulation.
Furthermore, new internal enums are created with an underscore name.
The meta class was changed from EnumMeta to EnumType.
[ChangeLog][shiboken6] The new Python Enums are now compatible with Python 3.11
Christian Tismer [Tue, 21 Jun 2022 08:22:04 +0000 (10:22 +0200)]
Shiboken: Fix the oldest shiboken bug ever which shows up on Python 3.11
b7df2f1c0 "Fix signal initializer.", 18. May 2010 at 00:55
There was a `PySequence_Check` in the evaluation of some signature
function parameter processing, which should have been `PyTuple_Check`.
Since the new PyEnums are also sequences, the new optimization in
Python 3.11 changed the parameter handling in a correct way and
replaced the argument tuple by a direct single argument of an enum
type. And that is also a sequence ...
There are probably still dormant issues like this in the codebase
which gives reason to submit a task that checks all Python interface
functions for correctness.
libshiboken: Fix crashes with static strings in Python 3.11
In Python 3.11, some strings come with a refcount above decimal 1000000000, apparently indicating that they are interned. Replace the
mechanism by PyUnicode_InternFromString().
Task-number: PYSIDE-1960 Pick-to: 6.3 6.2 5.15
Change-Id: I6436afee351f89da5814b5d6bc76970b1b508168 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit a09a1db8391243e6bb290ee66bb6e3afbb114c61)
Gbp-Pq: Name libshiboken-Fix-crashes-with-static-strings-in-Python-3.11.patch
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Dmitry Shachnev [Sat, 7 Jan 2023 13:38:12 +0000 (13:38 +0000)]
pyside2 (5.15.8-1) unstable; urgency=medium
* Team upload.
* New upstream release.
* Drop patches, included in the new release:
- fix-reuse-build.patch
- qApp-fix-flag-handling.patch
- py3.10-prep-reset-the-type-cache-after-feature-switching.patch
- py3.10-prep-Fix-parser.py-for-changed-typing-module.patch
- py3.10-prep-Finally-support-Python-3.10.patch
- py3.10-prep-Fix-a-very-old-refcounting-error-in-time_test.patch
- shiboken6-Adapt-to-LLVM-12.01.patch
* Refresh debian/patches/blacklist-failing-tests.patch.
* Backport 7 upstream patches to support Python 3.11 (closes: #1027950).
* Remove dh-exec (debhelper now supports substitutions natively).
* Revert a change from 5.15.8 which broke build without limited API.
* Add a patch to fix AttributeError in signature_bootstrap.py.
* Fix redundant-globbing-patterns Lintian warning.
* Bump Standards-Version to 4.6.2, no changes needed.
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Christian Tismer [Fri, 20 Aug 2021 16:18:57 +0000 (18:18 +0200)]
py3.10-prep: Fix a very old refcounting error in time_test.py
Since 2012-03-08, there was a refcounting error in
the typesystem_sample.xml file at <value-type name="Time">.
The boolean function results were not refcounted.
This bug was hard to find because nobody expects a failure in the
testing code, and the error shows up at the very end in the
finalization code, totally unrelated to the error location.
In order to find it, the setting `PYTHONMALLOC=malloc` was needed,
because otherwise we got a Python memory dump but no traceback.
Then, Python was modified and code was inserted in the various
involved `code_dealloc`, `tupledealloc` and `object_dealloc`
functions that printed the involved refcounts and types before
performing the actual deallocation.
This bug actually was of no harm since only the wrong test was
involved. It was very misleading because there were quite some
changes to the `datetime` module in Python 3.10. But the bug
was nothing but a dormant refcounting error.
After the major problems are solved in
py3.10-prep: re-implement zip import
py3.10-prep: reset the type cache after feature switching
py3.10-prep: Fix parser.py for changed typing module
, there are only some minor changes left to do. One thing
is still not clear:
* Unsolved: In time_test.py, the last two tests work but
crash at shutdown.
It is not yet clear if this is a PySide or Python error.
This will crash Python 3.10 if not solved until the release.
py3.10-prep: Fix parser.py for changed typing module
The typing module has subtle changes that are not even
documented: Typing types now have a __name__ attribute.
That confused the parser of the pyi generator because
suddenly stingizing
Callable[..., Optional[str]]
resulted in
Callable[..., Optional]
because of special rules that return the generic name
of a typing type, which was very unexpected. Finding this bug
took a lot of debugging of the recursive `_resolve_type`
function.
py3.10-prep: reset the type cache after feature switching
When using feature switching in Python 3.10, there were
funny effects where switched and un-switched versions appeared
to co-exist.
It turned out that we were hit by function caching that
is now implemented for the LOAD_ATTR opcode.
It was not known that caching would happen at all for
PySide classes because we don't use Py_TPFLAGS_VALID_VERSION_TAG.
But actually, this flag is used internally by Python to do some
optimizations, and we just have to notify the interpreter of
type changes by PyType_Modified().
Christian Tismer [Wed, 23 Dec 2020 11:28:16 +0000 (13:28 +0200)]
qApp: fix flag handling in Python 3.8+ and a Python 3.9 issue
This is an old problem that was solved for Python 2.7.
From Python 3.8 on, the behavior is the same with Python 3.
The fix finally was to extend a Python 2.7 patch to Python 3
as well. See the Jira issue for details.
This patch includes also a small patch that was mentioned as
necessary for Python 3.9: Python issue 40217. I have seen no
effect of this change yet but applied the patch, anyway.
Dmitry Shachnev [Wed, 16 Dec 2020 17:26:18 +0000 (20:26 +0300)]
Pass --reuse-build only to commands that use DistUtilsCommandMixin
This is a concatenation of two upstream commits:
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=ed0571df854a232e
- https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=3f00c2adad2e38b0
Dmitry Shachnev [Sun, 14 Nov 2021 18:08:50 +0000 (21:08 +0300)]
Find the build directory matching the current interpreter
This is needed to allow us to run tests with all supported Python versions.
Without this patch, the latest build directory will be always picked, no
matter what the current interpreter is.
Christian Tismer [Fri, 20 Aug 2021 16:18:57 +0000 (18:18 +0200)]
py3.10-prep: Fix a very old refcounting error in time_test.py
Since 2012-03-08, there was a refcounting error in
the typesystem_sample.xml file at <value-type name="Time">.
The boolean function results were not refcounted.
This bug was hard to find because nobody expects a failure in the
testing code, and the error shows up at the very end in the
finalization code, totally unrelated to the error location.
In order to find it, the setting `PYTHONMALLOC=malloc` was needed,
because otherwise we got a Python memory dump but no traceback.
Then, Python was modified and code was inserted in the various
involved `code_dealloc`, `tupledealloc` and `object_dealloc`
functions that printed the involved refcounts and types before
performing the actual deallocation.
This bug actually was of no harm since only the wrong test was
involved. It was very misleading because there were quite some
changes to the `datetime` module in Python 3.10. But the bug
was nothing but a dormant refcounting error.